//
//  EFSegmentItem+Theme.m
//  ThemeKit
//
//  Created by 董艳武 on 2019/1/22.
//  Copyright © 2019 Javor Feng. All rights reserved.
//

#import "EFSegmentItem+Theme.h"
#import "NSObject+Theme.h"
#import <objc/runtime.h>

@implementation EFSegmentItem (Theme)

-(void)setTheme_norColor:(ThemeColorPicker)theme_norColor {
    objc_setAssociatedObject(self, @selector(theme_norColor), theme_norColor, OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.norColor = theme_norColor();
    [self.pickers setValue:[theme_norColor copy] forKey:@"setNorColor:"];
}

-(void)setTheme_selColor:(ThemeColorPicker)theme_selColor {
    objc_setAssociatedObject(self, @selector(theme_selColor), theme_selColor, OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.selColor = theme_selColor();
    [self.pickers setValue:[theme_selColor copy] forKey:@"setSelColor:"];
}

-(ThemeColorPicker)theme_norColor {
    return objc_getAssociatedObject(self, @selector(theme_norColor));
}

-(ThemeColorPicker)theme_selColor {
    return objc_getAssociatedObject(self, @selector(theme_selColor));
}

@end
